<template>
	<view class="ph_input">
		<textarea v-if="type === 'textarea'" value="" />
		<input v-else class="input_control" type="text" @input="" @focus="" @blur="" value="" />
		<text class="placeholder_text" :class="{'input_focus': focus}">{{placeholder}}</text>
	</view>
</template>

<script>
	export default {
		props: {
			type: {
				type: String,
				default: 'input'
			},
			borderType: {
				type: String,
				default: 'outline'
			},
			placeholder: {
				type: String,
				default: ''
			},
		},
		data() {
			return {
				focus:false
			};
		},
		methods:{
			onControlInput(e){
				this.$emit('input',e)
			},
			onControlFocus(e){
				this.$emit('focus',e)
			},
			onControlBlur(e){
				this.$emit('blur',e)
			}
		}
	}
</script>

<style lang="scss">
	
</style>
